function permissionRequestNotifications() {
// Let's check if the browser supports notifications
if (!("Notification" in window)) {
ons.notification.toast('This browser does not support system notifications', { timeout: 2000, animation: 'fall' });


}

// Let's check whether notification permissions have already been granted
else if (Notification.permission === "granted") {
// If it's okay let's create a notification
//var notification = new Notification("Hi there!");
ons.notification.toast('Notifications are granted for this application.', { timeout: 2000, animation: 'fall' });
}

// Otherwise, we need to ask the user for permission
else if (Notification.permission !== 'denied') {
Notification.requestPermission(function (permission) {
// If the user accepts, let's create a notification
if (permission === "granted") {
var notification = new Notification('Hi there!');
}
});
}

// Finally, if the user has denied notifications and you 
// want to be respectful there is no need to bother them any more.
}